using System;
using System.Collections;

namespace Crawler
{
	/// <summary>
	/// 
	/// </summary>
	public class ReferenceAddedToDownloadStoreArgs : EventArgs
	{
		private static Queue keysAdded = new Queue();
		
		public ReferenceAddedToDownloadStoreArgs(IKey key)
		{
			keysAdded.Enqueue(key);
		}

		public static void AddKeysToCachedQueue(IKey key)
		{
			keysAdded.Enqueue(key);
		}

		public IKey NextKey()
		{
			return keysAdded.Dequeue() as IKey;
		}

		public int GetCount()
		{
			return keysAdded.Count;
		}
	}
}
